Skip to content

Use atomic.Pointer to prevent race condition in bccsp.Factory#48

Merged
pfi79 merged 1 commit into
hyperledger:mainfrom
liran-funaro:atomic-factory
Mar 24, 2026
Merged

Use atomic.Pointer to prevent race condition in bccsp.Factory#48
pfi79 merged 1 commit into
hyperledger:mainfrom
liran-funaro:atomic-factory

Conversation

@liran-funaro

Copy link
Copy Markdown
Contributor

This PR uses atomic.Pointer to prevent race condition in bccsp.Factory.

@liran-funaro liran-funaro requested a review from a team as a code owner March 24, 2026 14:18
@liran-funaro liran-funaro force-pushed the atomic-factory branch 2 times, most recently from bdbffce to 99aa359 Compare March 24, 2026 14:44

@pfi79 pfi79 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. In the fabric project, it is customary for import sections to consist of 2 sections rather than 3.

  2. You definitely need to check the performance of your changes on fabric itself. That is, make a fork of fabric, replace fabric-lib-go with your own version, and run all fabric tests.

Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
@liran-funaro

Copy link
Copy Markdown
Contributor Author

@pfi79 Thanks for the quick review.
I consolidated the imports and ran the tests in the CI: https://github.com/liran-funaro/fabric/actions/runs/23500260517

@pfi79 pfi79 merged commit 8fe16c9 into hyperledger:main Mar 24, 2026
4 checks passed
@pfi79

pfi79 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

I have released a new v1.1.3 version.

@liran-funaro liran-funaro deleted the atomic-factory branch March 24, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Race Condition in bccsp.Factory Global State

2 participants